/* 校准按钮组 */
.calibrate-btn-group {
  margin-top: 10px;
}

/* 校准输入区域 */
.calibrate-input {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e8e8e8;
}

.calibrate-tip {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}

/* 校准模式覆盖提示 */
.calibrate-tip-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  background: rgba(245, 34, 45, 0.9);
  color: white;
  border-radius: 4px;
  font-size: 12px;
  z-index: 10;
}

/* 校准线段样式 */
.calibrate-line {
  position: absolute;
  height: 2px;
  background-color: #f5222d;
  transform-origin: left center;
  z-index: 1;
}

/* 原有样式不变 */
.container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #f5f5f5;
}

.left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
  gap: 20px;
}

.upload-area {
  padding: 16px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.upload-tip {
  margin-top: 8px;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

.measure-container {
  flex: 1;
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  overflow: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.measure-wrapper {
  position: relative;
  display: inline-block;
  margin: 0 auto;
  // padding: 10px;
  background: #fafafa;
  border-radius: 4px;
  cursor: crosshair;
}

.measure-image {
  max-width: 100%;
  max-height: calc(100vh - 200px);
  display: block;
  border: 1px solid #eee;
  border-radius: 4px;
}

.no-image-hint {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  padding: 20px;
  text-align: center;
}

.hint-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: #ccc;
}

.temp-distance {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-size: 13px;
  color: #333;
  z-index: 10;
}

.drawing-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.segment-line {
  position: absolute;
  height: 2px;
  transform-origin: left center;
  z-index: 1;
}

.temp-segment-line {
  position: absolute;
  height: 1px;
  transform-origin: left center;
  z-index: 1;
  background-image: linear-gradient(to right, currentColor 50%, transparent 50%);
  background-size: 6px 1px;
  background-repeat: repeat-x;
}

.point-marker {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 0 0 2px white;
  border: 1px solid #333;
}

.point-label {
  position: absolute;
  font-size: 12px;
  color: #333;
  white-space: nowrap;
  z-index: 3;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 6px;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.records-panel {
  width: 300px;
  min-height: 100vh;
  background: #fff;
  border-left: 1px solid #e8e8e8;
  padding: 20px;
  overflow-y: auto;
  display: block;
}

.records-panel h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 16px;
  font-weight: 500;
}

.empty-record {
  padding: 30px 10px;
  text-align: center;
  color: #999;
  border: 1px dashed #e8e8e8;
  border-radius: 6px;
  font-size: 14px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.record-item {
  display: flex;
  align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

.record-item.temp-record {
  opacity: 0.8;
}

.color-tag {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 12px;
}

.record-info {
  flex: 1;
}

.record-index {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.record-distance {
  font-size: 13px;
  color: #666;
}

.delete-btn {
  color: #f5222d;
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  padding: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.delete-btn:hover {
  opacity: 1;
  background: #fff1f0;
}

.reset-btn {
  width: 100%;
  margin-top: 20px;
  padding: 8px 0;
}

.mouse-crosshair {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: 5;
  transform: translate(-50%, -50%);
}

.mouse-crosshair::before,
.mouse-crosshair::after {
  content: '';
  position: absolute;
  background-color: #f5222d;
}

.mouse-crosshair::before {
  width: 100%;
  height: 1px;
  top: 50%;
  left: 0;
}

.mouse-crosshair::after {
  width: 1px;
  height: 100%;
  top: 0;
  left: 50%;
}